/* eslint-disable no-unused-vars */
import axios from '@/libs/api.request'

export const getRoles = () => {
  return axios.request({
    url: 'sys/role/all',
    method: 'get'
  })
}

export const info = (id) => {
  return axios.request({
    url: 'sys/role/info/' + id,
    method: 'get'
  })
}

export const saveRole = (obj) => {
  return axios.request({
    url: 'sys/role/save',
    method: 'post',
    data: obj
  })
}

export const deleteRole = (obj) => {
  return axios.request({
    url: 'sys/role/delete',
    method: 'post',
    data: obj
  })
}

export const saveRoleAuthority = (obj) => {
  return axios.request({
    url: 'sys/role/saveAuthority',
    method: 'post',
    data: obj
  })
}
